package com.corpgovernment.permission.mapper;

import com.corpgovernment.organization.common.mybatis.TkMapper;
import com.corpgovernment.permission.entity.db.MbRole;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

@Repository
public interface RoleMapper extends TkMapper<MbRole> {

	List<MbRole> findByRoleIds(@Param("roleIds") List<Long> roleIds);
	List<MbRole> batchSearchRoleName(@Param("roleIds") Set<Long> roleIds);
	@Select("select * from  mb_role where id in (select role_id from mb_user_role where uid=#{uid})")
	List<MbRole> queryRoleVersionByUid(@Param("uid") String uid);
}
